import { constantRoutes } from '@/router'

export default {
  namespaced: true,
  state: {
    menuList: []// 定义一个路由表
  },
  mutations: {
    setMenuList(state, asyncRouters) {
      // 将动态路由和静态路由用剩余运算符情节在一起
      state.menuList = [...constantRoutes, ...asyncRouters]
    }
  }}
